<?php
/********/
/* live */
/********/

define("T_live","pms_plug_live");

/* selection (liste)*/
$sql['live']['select_live']="SELECT * FROM ".T_live." ORDER BY live_date DESC";
$sql['live']['select_live_nb']="SELECT COUNT(*) AS nb FROM ".T_live." ";
$sql['live']['select_live_condition']="SELECT * FROM ".T_live." {condition} {order} {limit}";

/* selection (details) */
$sql['live']['select_live_details'] = "SELECT * FROM ".T_live." WHERE live_id='{id}'";

/* insertion */
$sql['live']['insert_live']="INSERT INTO ".T_live." (live_name, live_description, live_date, live_status) VALUES ('{name}','{description}',NOW(),'{status}')";  

# modification
$sql['live']['edit_live']="UPDATE ".T_live." SET live_name='{name}' 
                            , live_description='{description}'
                            , live_status='{status}'
                            WHERE live_id='{id}' ";

/* verification */
// $sql['live']['verif_presence_live']="SELECT live_id FROM ".T_live." WHERE live_date='{date}' AND live_id!='{id}'";

/* suppression */
$sql['live']['sup_live']="DELETE FROM ".T_live." WHERE live_id='{id}'";
?>